package com.project.service;

import com.project.entity.Class;

import java.util.List;

/**
 * Created by WheelChen on 2017/4/19.
 */
public interface ClassService {
    /**
     * author: WheelChen
     * date: 2017-4-19
     * function: 添加班级
     *
     * @param classroom
     * @return
     */
    int add(Class classroom);

    /**
     * author: WheelChen
     * date: 2017-4-19
     * function: 删除班级信息
     *
     * @param id
     * @return
     */
    int removeOne(Integer id);

    /**
     * author: WheelChen
     * date: 2017/9/16
     * function: 删除班级及班级下的所有学生信息
     *
     * @param id
     * @return
     */
    boolean removeOneChain(Integer id);

    /**
     * author: WheelChen
     * date: 2017-4-19
     * function: 根据id修改班级信息
     *
     * @param classroom
     * @return
     */
    int modify(Class classroom);

    /**
     * author: WheelChen
     * date: 2017-4-19
     * function: 根据id查找班级信息
     *
     * @param id
     * @return
     */
    Class findOne(Integer id);

    /**
     * author: WheelChen
     * date: 2017/7/13
     * function: 根据专业id批量查找班级
     *
     * @param majorid 专业表id
     * @return
     */
    List<Class> findBatchByMajorid(Integer majorid);

    /**
     * author: WheelChen
     * date: 2017/7/25
     * function: 根据学院id批量查找班级
     *
     * @param schoolId 学院id
     * @return
     */
    List<Class> findBatchBySchoolId(Integer schoolId);

    /**
     * author: WheelChen
     * date: 2017/8/10
     * function: 检查班级是否已存在
     *
     * @param clazz
     * @return true - 存在 false - 不存在
     */
    boolean checkClassIsExist(Class clazz);

}
